# -*- coding: utf-8 -*-

tRegs = {
        "PM710": {
          "FEI":  [4105, 1, "Factor d'escala intensitat", 0, 0, "E"],
          "FEV":  [4106, 1, "Factor d'escala voltatge",   0, 0, "E"],
          "FEP":  [4107, 1, "Factor d'escala potencia",   0, 0, "E"],

          "PAT":  [4006, 1, u"Potència Activa total",           0, 32767, "FEP"],
          "PAP":  [4007, 1, u"Potència Aparent total",          0, 32767, "FEP"],
          "PRT":  [4008, 1, u"Potència Reactiva total",         0, 32767, "FEP"],
	  "FPT":  [4009, 1, u"Factor de potencia total",    0.0001, 10000, ""],
	  "FRE":  [4013, 1, u"Freqüència",               0.01,  6500, ""],
	  "IPF":  [4020, 4, "Intensitat/fase",             0, 32767, "FEI"],
	  "TPF":  [4033, 3, u"Tensió Fase-Neutre",          0, 32767, "FEV"],
	  "PAF":  [4036, 3, "Pot. Activa/fase",            0, 32767, "FEP"],

          "THDV": [4049, 3, u"% Armònics de tensió/fase",    0.1, 10000, ""],
          "THDI": [4045, 4, u"% Armònics d'intensitat/fase", 0.1, 10000, ""]
        },

        "PM500": {
          "PAT": [790, 1, "Pot. Activa total", 0.01],
          "PRT": [792, 1, "Pot. Reactiva total", 0.01],
	  "FRE": [788, 1, "Frec.",               0.01, 6500, ""],
	  "IPF": [838, 3, "Intensitat/fase" ,10],
	  "TPF": [782, 3, "Tensio/fase",10],
	  "PAF": [798, 3, "Pot. Activa/fase",0.01]
        }  
}

factorEscala = {"65532": 0.0001,
                "65533": 0.001,
                "65534": 0.01,
                "65535": 0.1,
                "0":     1.0,
                "1":     10,
                "2":     100,
                "3":     1000,
                "4":     10000}

